package com.cnswhy.cloud.server.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.cnswhy.cloud.common.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author cnswhy
 * @since 2021-04-09
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_iot_charging_line_scale")
@ApiModel(value = "IotChargingLineScale", description = "")
@AllArgsConstructor
public class IotChargingLineScale extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 终端编号
     */
    @ApiModelProperty(value = "终端编号")
    @TableField("terminal_id")
    @Excel(name = "终端编号")
    private Long terminalId;

    /**
     * 小时数
     */
    @ApiModelProperty(value = "小时数")
    @TableField("hours")
    @Excel(name = "小时数")
    private Integer hours;

    /**
     * 套餐名称
     */
    @ApiModelProperty(value = "套餐名称")
    @Length(max = 255, message = "套餐名称长度不能超过255")
    @TableField(value = "menu_name", condition = LIKE)
    @Excel(name = "套餐名称")
    private String menuName;

    /**
     * 套餐价格
     */
    @ApiModelProperty(value = "套餐价格")
    @TableField("menu_amt")
    @Excel(name = "套餐价格")
    private Long menuAmt;

    /**
     * 套餐价格
     */
    @ApiModelProperty(value = "套餐价格")
    @TableField("merchant_amt")
    @Excel(name = "套餐价格")
    private Long merchantAmt;


    @Builder
    public IotChargingLineScale(Long id, LocalDateTime createTime, LocalDateTime updateTime, Long updateUser, Long createUser, 
                    Long terminalId, Integer hours, String menuName, Long menuAmt, Long merchantAmt) {
        this.id = id;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.updateUser = updateUser;
        this.createUser = createUser;
        this.terminalId = terminalId;
        this.hours = hours;
        this.menuName = menuName;
        this.menuAmt = menuAmt;
        this.merchantAmt = merchantAmt;
    }

}
